ARCHIVE.DUDU2 - FUNCTIONALITY UPDATES

This document describes the changes made to implement the requested functionality:

1. FILE ORDERING FUNCTIONALITY
==============================
- Added a `sort_order` column to the `attachments` table
- Modified file upload and attachment handling to preserve and display files in user-defined order
- Added drag-and-drop reordering capability in the admin interface

To apply this change to your database, run the following SQL command:
ALTER TABLE attachments ADD COLUMN sort_order INT NOT NULL DEFAULT 0;

2. CATEGORY SORTING
===================
- Modified category display to show English categories first, then Russian categories
- Both groups are sorted alphabetically within their language group
- This affects the navigation sidebar and the "All Categories" page

3. IMPLEMENTATION NOTES
=======================
- The drag-and-drop functionality allows reordering of files before saving a post
- For existing attachments, a sort order based on upload time has been implemented
- All category listings now use the same sorting logic

4. FILES MODIFIED
=================
- init_db.sql - Added sort_order column to attachments table
- save_post.php - Save sort_order when saving attachments
- post.php - Display attachments in sort_order
- admin.php - Added drag-and-drop reordering interface
- index.php - Updated category sorting
- browse.php - Updated category sorting

5. ADDITIONAL FILES
===================
- update_attachment_order.php - Script to update sort_order for existing attachments

To update your database schema, you can either:
1. Run the ALTER TABLE command above, or
2. Recreate the attachments table using the updated init_db.sql